package com.java.al.analysisxml;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List;

import junit.framework.TestCase;

public class ParseTest {
	public void testDom() throws Exception{
//		src/analysisxml/
		InputStream path = ParseTest.class.getResourceAsStream("ParseTest");
		System.out.println(path.toString());
		File file = new File("Book.xml");
		InputStream in = file.getClass().getResourceAsStream("Book.xml");
		System.out.println(file.getAbsolutePath());
		System.out.println(file.getCanonicalPath());
		AnalysisXML dom = new AnalysisXML();
//		List<Book> books = dom.getBooks("src/analysisxml/Book.xml");
//		for(Book book : books){
//			System.out.println(book.toString());
//		}
	}
	public static void main(String[] args) {
		ParseTest t = new ParseTest();
		try {
			t.testDom();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}